<template>
  <div id="app">
    <div class="head">
    <mt-header id="header" fixed :title="$route.meta.title">
      <mt-button icon="back" slot="left" v-show="iShowBack" v-on:click="gotoindex">返回</mt-button>
    </mt-header>
    </div>
  
    <div class="router">
      <router-view/>
    </div>
    <div class="bottem">
    <tablebar></tablebar>
    </div>
  </div>
</template>

<script>
import tablebar from "./components/TableBar.vue";
export default {
  name: "app",
  data() {
    return {
      iShowBack: 'false',
    };
  },
  updated() {
    this.iShowBack = this.$route.path !== "/index"
   
   
  },
  methods:{
    gotoindex(){
      this.$router.push("/index");
    }
  },
  components: {
    tablebar,
  },
};
</script>

<style lang="scss" scoped>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  box-sizing: border-box;
  
  #header {
    background-color: #ec4141;
    
  }
  
}
 .router{
   margin: 40px 0px ;
   margin-bottom: 90px;
 }
</style>
